@echo off
@setlocal enableextensions enabledelayedexpansion

set CURRENT_DIR=%~dp0
set APP_HOME=%CURRENT_DIR%
set DIR_PATH=%CURRENT_DIR%


rem -----------------------------------------------------------
rem OPTIONS=Server,jsp,jmx,resources,websocket,ext,plus,annotations
set JAVA_OPTS=-server -Xmx1G
rem -----------------------------------------------------------



set MAINCLASS=yanagishima.server.YanagishimaServer
set LIB_DIR=lib
set CLASS_DIR=conf
set PRO_ARGS=-conf %APP_HOME%/conf
set JVM_ARGS=%JAVA_OPTS% -server -Dapp.home=%APP_HOME% -DAPP_NAME=yanagishima

set jcommand=java.exe
set runtype=-cp
set LIB_DIR=%APP_HOME%\%LIB_DIR%
set SP_CLASSPATH=%APP_HOME%conf;%APP_HOME%lib\*
set FILE_SUFFIX=*.jar

@echo APP_HOME=%APP_HOME%
@echo off

rem Windows 系统类路径过长，无法加载类。。。
rem for %%a in (%LIB_DIR%\%FILE_SUFFIX%) do (
rem     set APPEND_LIB=!APPEND_LIB!;%%a
rem )

%jcommand% %JVM_ARGS% %runtype% %SP_CLASSPATH%  %MAINCLASS% %PRO_ARGS%